pull: Don't try to cache summaries for pull-local
authorAlexander Larsson <alexl@redhat.com>
Mon, 4 Apr 2016 12:26:53 +0000 (14:26 +0200)
committerColin Walters (automation) <walters+githubbot@verbum.org>
Tue, 5 Apr 2016 19:12:09 +0000 (19:12 +0000)
Not only does this not make sense from a performance perspective, but
it also doesn't work because we can't use a url as a path element.

Closes: #237
Approved by: cgwalters

src/libostree/ostree-repo-pull.c

index 26284806426b925f3c547c6466a24892f2060ba1..238fdf65d43109b7af578023ce9b5779d6a4002c 100644 (file)
@@ -2107,12 +2107,14 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
         soup_uri_free (uri);
       }
 
-    if (bytes_sig && !_ostree_repo_load_cache_summary_if_same_sig (self,
-                                                                   remote_name_or_baseurl,
-                                                                   bytes_sig,
-                                                                   &bytes_summary,
-                                                                   cancellable,
-                                                                   error))
+    if (bytes_sig &&
+        !_ostree_repo_remote_name_is_file (remote_name_or_baseurl) &&
+        !_ostree_repo_load_cache_summary_if_same_sig (self,
+                                                      remote_name_or_baseurl,
+                                                      bytes_sig,
+                                                      &bytes_summary,
+                                                      cancellable,
+                                                      error))
       goto out;
 
     if (bytes_summary)
@@ -2160,7 +2162,8 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
 
     if (!summary_from_cache && bytes_summary && bytes_sig)
       {
-        if (!_ostree_repo_cache_summary (self,
+        if (!_ostree_repo_remote_name_is_file (remote_name_or_baseurl) &&
+            !_ostree_repo_cache_summary (self,
                                          remote_name_or_baseurl,
                                          bytes_summary,
                                          bytes_sig,